package com.at.atapp;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.os.Handler;

public class StartSplashScreen extends Activity {

	/** Called when the activity is first created. */
	@Override
	public void onCreate(Bundle savedInstanceState) {
	    super.onCreate(savedInstanceState);
	    setContentView(R.layout.activity_start_splash);
	    
	    Handler handler = new Handler();
	    
        // run a thread after 2 seconds to start the home screen
        handler.postDelayed(new Runnable() {
 
            @Override
            public void run() {
 
                // make sure we close the splash screen so the user won't come back when it presses back key
 
                finish();
                // start the home screen
 
                Intent intent = new Intent(StartSplashScreen.this, MainActivity.class);
                StartSplashScreen.this.startActivity(intent);
 
            }
 
        }, 5000); // time in milliseconds (1 second = 1000 milliseconds) until the run() method will be called

	}

}
